import request from '@/utils/request'

// 获取用户信息
export const GetUserInfoAPI = () => request.get('user/info')

// 更新自身信息
export const PutUserInfoAPI = ({username,password,newpassword,bio,avatar}) =>{
  if(username){
   return  request.put('user/info',{username,password,newpassword,bio,avatar})
  }else{
    return   request.put('user/info',{password,newpassword,bio,avatar})
  }
}
